from django.contrib import admin

from .models import User
from .models import MushBox
from .models import UpdateDataSet
from .models import MbControl


# Register your models here.
class UserAdmin(admin.ModelAdmin):
    list_display = ('user_id', 'user_name', 'user_password', 'gmt_time')


class MushBoxAdmin(admin.ModelAdmin):
    list_display = ('mb_id', 'mb_name', 'mb_des', 'gmt_time', 'userid_id')


class UpdateDataSetAdmin(admin.ModelAdmin):
    list_display = (
        'data_id', 'mb_temp', 'mb_hum', 'mb_isgrow', 'mb_isqipe', 'mb_enfan', 'mb_enhotfan', 'mb_enhum',
        'mbid_id', 'mb_encoldfan', 'mb_time')


class MbControlAdmin(admin.ModelAdmin):
    list_display = (
        'mbid', 'mb_model', 'mb_temmax', 'mb_temmin', 'mb_hummax', 'mb_hummin', 'mb_enfan', 'mb_enhotfan',
        "mb_encoldfan", 'mb_enhum', 'mb_waterruntime', 'mb_waterspan')


admin.site.register(User, UserAdmin)
admin.site.register(MushBox, MushBoxAdmin)
admin.site.register(UpdateDataSet, UpdateDataSetAdmin)
admin.site.register(MbControl, MbControlAdmin)
